package com.ctshk.rpc.system.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author 谢诗宏
 * @since 2020-12-23
 */
@Data
@ApiModel(value="PermissionMenuDTO对象", description="权限菜单")
public class PermissionMenuDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty(value = " 菜单key(前端树形菜单组件需要)")
    private Long key;

    @ApiModelProperty(value = " 标题名称")
    private String title;

    @ApiModelProperty(value = "1 菜单;2 页面;3 按钮")
    private Integer menuType;

    @ApiModelProperty(value = "优先级")
    private Integer sort;

    @ApiModelProperty(value = "父级菜单id")
    private Long parentId;

    @ApiModelProperty(value = "所有父级菜单ids数组")
    private List<Long> parentIds;

    @ApiModelProperty(value = "子节点菜单")
    private List<PermissionMenuDTO> children;

    public Long getKey() {
        return this.key = this.id;
    }

}
